/*
 * TODO
 */
package com.xtrip.adm.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.xtrip.adm.dao.AreaDao;
import com.xtrip.adm.model.Area;
import com.xtrip.base.BaseDao;
import com.xtrip.base.BaseService;
import com.xtrip.common.BasicConstant;
import com.xtrip.util.IdGenerator;

/**
 * @project xtrip
 * @author shiming.yao
 * @time 2013-5-23
 */
@Service("areaService")
public class AreaService extends BaseService<Area>{

	@Resource(name="areaDao")
	private AreaDao dao;
	@Override
	public BaseDao<Area> getDao() {
		// TODO Auto-generated method stub
		return dao;
	}
	public boolean insertArea(Area area){
		String id = IdGenerator.generateId(BasicConstant.PREFIX_AREA);
		area.setId(id);
		return dao.insert(area)==1;
	}
	public void updateArea(Area area){
		dao.update(area);
	}

}
